package com.easymin.weixin.manager;

import org.springframework.transaction.annotation.Transactional;

import com.easymin.weixin.entity.WxBind;


public interface WxBindManager {

  WxBind insert(WxBind wxbind);

  WxBind findByOpenIdAndAppKey(String openId, String appKey);

  WxBind findByPhoneAndAppKey(String phone, String appKey);

  WxBind findOne(String phone, String openId, String appKey);

  int delete(Long id, String appKey);

  /**
   * 绑定微信号与手机号.
   */
  int bind(String appKey, String phone, String openId, Long passengerId);

  /**
   * 注销用户
   * @param appKey 系统key
   * @param phone 电话
   * @param openId openId
   * @return
   */
  public void debind (String appKey, String phone, String openId);

}
